import request from '../axios/index'

export const notice = () => {
    return request('get', '/home/notice')
}
export const blindBox = (params) => {
    return request('get', '/home/blindBox', params)
}
export const Banner = () => {
    return request('get', 'home/banner')
}

export const login = (params) => {
    return request('post', '/user/login', params)
}

export const loginOut = () => {
    return request('get', '/user/logout')
}

export const userMsg = () => {
    return request('get', '/user/tokenByInfo')
}

export const topSkin = () => {
    return request('get', '/home/newGetSkin')
}

export const skinDetail = (id) => {
    return request('get', '/blindBox/boxId', { id })
}

export const skinGoodsDetail = (qeury) => {
    return request('get', '/blindBox/details', qeury)
}

export const skinHistoryDetail = (qeury) => {
    return request('get', '/blindBox/history', qeury)
}

export const regist = (qeury) => {
    return request('post', '/user/register', qeury)
}

export const resetPassword = (qeury) => {
    return request('post', '/user/update/password', qeury)
}

export const phoneCode = (qeury) => {
    return request('post', '/user/send/verification', qeury)
}

export const logout = () => {
    return request('post', '/user/logout')
}

export const uploadfile = (query) => {
    return request('post', '/user/upload', query)
}

export const updateUser = (query) => {
    return request('post', '/user/update/userInfo', query)
}

export const updateInvite = (query) => {
    return request('post', '/user/invitation/code', query)
}

export const backpackList = (query) => {
    return request('get', '/user/mybackpack', query)
}